package com.bjsdzk.collector.config;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;

import javax.servlet.http.HttpServletRequest;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;



//@Aspect
//@Component
public class DubboAspect {

	private Logger logger = LoggerFactory.getLogger(DubboAspect.class);
//	
//	@Pointcut("within(com.bjsdzk.backend.rpc..*)")
//	public void webLog() {
//		
//	}
	
//	@Pointcut("execution(* com.bjsdzk.backend.rpc.before.AliIotBefore.*(..))")
//	@Pointcut("execution(* com.bjsdzk.collector.rpc..*.*(..))")
//	@Pointcut("this(com.bjsdzk.backend.rpc.Platform2Service)")
//	@Pointcut("this(com.bjsdzk.backend.rpc.Platform2Service)")
	@Pointcut("execution(* com.bjsdzk.collector.rpc.MockPlatformService.*(..))")
//	@Pointcut("execution(* com.bjsdzk.collector.rpc...(..))")
	public void webLog() {
		
	}
	
	
	@AfterThrowing(throwing="ex",pointcut="execution(* com.bjsdzk.collector.one2one.HostServer.*(..))")
	public void page(Throwable ex) throws Throwable {
		ex.getMessage();
	}
//	
//	@Pointcut("execution(* com.bjsdzk.backend.rpc...(..))")
//	public void webLog3() {
//		
//	}
	
	@Before(value="webLog()")
	public void page3(JoinPoint joinpoint) throws Throwable {
		System.out.println("");
	}
}

